package gin_encoder

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

func NoRouteHandler(c *gin.Context) {
	x, ok := c.Get("result")
	if !ok {
		c.Abort()
		return
	}
	result, e := x.(*Response)
	if !e {
		c.Abort()
		return
	}
	result.Code = http.StatusNotFound
}
